package 动态数组;



public class Main {
    public static void main(String[] args) {

        Arraylist<Person>arraylist = new Arraylist<>();
        arraylist.add(new Person(20,"rose"));
        arraylist.add(new Person(20,"jack"));
        arraylist.add(new Person(20,"zed"));
        arraylist.add(null);
        arraylist.add(null);
        arraylist.add(null);

        System.out.println(arraylist);
        System.out.println(arraylist.indexOf(null));

//        arraylist.clear();
//
//        // 调用finalize函数回收内存
//        System.gc();

    }
}
